package com.xiaoge.response;

/**
 * @Description: TODO
 * @author: scott
 * @date: 2020年10月22日 15:13
 */
public enum ResultCode implements CustomizeResultCode{

    SUCCESS(20000,"成功"),
    ERROR(40000,"失败"),
    PASS_NOT_CORRECT(3005,"密码不正确！请重试！"),
    NOT_LOGIN(3006,"尚未登录！"),
    ARITHMETIC_EXCEPTION(3007,"算术异常"),
    USER_NOT_FOUND_EXCEPTION(3008,"用户不存在"),
    INTRODUCTION_NOT_FOUND(2005,"没有找到这一条历史信息！有人侵入数据库！"),
    PAGE_NOT_FOUND(404,"你要请求的页面好像暂时飘走了..."),
    INTERNAL_SERVER_ERROR(500,"服务器错误"),
    UNKNOW_SERVER_ERROR(2001,"未知异常，请联系管理员！");
    ;

    private Integer code;

    private String message;

    ResultCode(Integer code,String message){
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
